#ifndef PANDADRIVE_H_
#define PANDADRIVE_H_

//#include <stdlib.h>
//#include <VxWorks.h>
#include "RobotDrive.h"
#include "GenericHID.h"

class PandaDrive : public RobotDrive
{
public:

	PandaDrive(UINT32 leftMotorChannel, UINT32 rightMotorChannel,
				GenericHID *leftStick, GenericHID *rightStick, 
				int tankButton, int arcadeButton, int nonslipButton, int slipButton, int increaseAccelButton, int decreaseAccelButton,
				float sensitivity = 0.5);
	
	~PandaDrive(void) {}

	void PandaDrive::NonSlipTankDrive();
	
	void PandaDrive::NonSlipArcadeDrive();
	
	int Teleop();
	
	float PandaDrive::ArcadeDrive(float UpperRight, float LowerRight, float UpperLeft, float LowerLeft, float xValue, float yValue);
	
	float PandaDrive::NonSlip(float speed, double delay, float& time);
	
	void PandaDrive::SetAccel(float AccelAmmount);
	
	float PandaDrive::GetAccelConst();
private:
	float PandaDrive::Limit(float num);
	float m_lastLeftValue;
	float m_lastRightValue;
	GenericHID *m_leftStick, *m_rightStick;
	int m_arcadeButton;
	int m_tankButton;
	int m_nonSlipButton;
	int m_slipButton;
	int m_decreaseAccelButton;
	int m_increaseAccelButton;
	float m_setLeftValue;
	float m_setRightValue;
	float m_leftSpeed;
	float m_rightSpeed;
	float m_speed;
	double m_delay;
	float m_lastSpeed;
	bool m_nonSlip;
	bool m_tank;	
	double m_lastTime;
	float m_maxAccel;
	bool m_reset;
};

#endif

